package com.by.dao;

import com.by.entity.Tb;
import org.springframework.jdbc.core.support.JdbcDaoSupport;

import java.util.List;

public class TbDaoSupportImpl extends JdbcDaoSupport implements TbDao {
    @Override
    public List<Tb> getAllTbs() {
        return null;
    }

    @Override
    public List<Tb> getTbsByCond(Tb tb) {
        return null;
    }

    @Override
    public int savaTb(Tb tb) {
        String sql="insert into tb(user_name,course,score,deptid) values(?,?,?,?)";
        Object[] params = {tb.getUser_name(),tb.getCourse(),tb.getScore(),tb.getDeptid()};
        return getJdbcTemplate().update(sql,params);
    }

    @Override
    public Tb getTbById(int id) {
        return null;
    }

    @Override
    public int updateTb(Tb tb) {
        return 0;
    }

    @Override
    public int dalTb(Tb tb) {
        return 0;
    }
}
